#!/bin/python3
import sys



if __name__=="__main__":
    fr=None
    fw=None
    try:
        fr=open("./blueprint.html",mode="r")
        fw=open(sys.argv[1]+".html",mode="w")      
    except IndexError:
        print(f"usage: {sys.argv[0]} [filename]")
        print("will generate ${filename}.html")
        exit(0)
    while True:
        try:
            buf=fr.readline()
            input(str(len(buf)))
            print(buf,file=fw,end="")
        except EOFError:
            print("finished")
            break
        except Exception as e:
            print(f"Unknown Exception:{e.__str__()}")
            break
    
    